<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ include file="../../../commons/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>列表</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript">
$(function(){
	//初始化操作默认不显示人员关联项
	$('#userId').combobox({   
	    url:'<%=path%>/busEmploee/findAll',
	    valueField:'id',   
	    textField:'name'
	});  
	
	var isOnlyDriver='${busInfo.isOnlyDriver}'
	if(isOnlyDriver==''){
		$('input:radio').eq(0).attr('checked', 'true')
	}
	
	var busCode='${busInfo.busCode}';
	if(busCode==''){
		$("#busCode").val("鄂F")
	}
	
	
	 $("[name = 'busInfo.isOnlyDriver']:radio").click(function(){
		 if($("input[type='radio']:checked").val()=='1'){
			 $("#usrTr").show();
		 }else{
			 $("#usrTr").hide();
		 }
		 
	 })
})

</script>
</head>
<body>
	<div id="tab_bd1">
		<div class="title">
			<div class="left">车辆信息管理</div>
		</div>
		<div class="frame">
		<form id="saveForm" name="saveForm" method="post"  >
			<table width="100%" border="0" cellpadding="1" cellspacing="1"
				bordercolor="#CCCCCC" bgcolor="#CCCCCC" align="center">

				<tr>
					<td width="15%" class="lbg">车辆名称：</td>
					<td width="35%">
						<input type="hidden" name="busInfo.id" value="${busInfo.id }" />
					<input type="text" class="easyui-validatebox"
						data-options="required:true" id="name" name="busInfo.busName"
						value="${busInfo.busName}"><font color="red" size="4">&nbsp;&nbsp;*&nbsp;</font>
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">车牌号：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						data-options="required:true" id="busCode" name="busInfo.busCode"
						value="${busInfo.busCode}"><font color="red" size="4">&nbsp;&nbsp;*&nbsp;</font>
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">座位数：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="siteNum" name="busInfo.siteNum"
						value="${busInfo.siteNum}"></td>
				</tr>
				<tr>
					<td width="15%" class="lbg">车辆拥有者：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="owner" name="busInfo.ower" 
						value="${busInfo.ower}">
						<font color="red" size="4">如果是共持股份，可写“联合”，后续再考虑扩展</font>
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">是否已有固定司机：</td>
					<td width="35%">
						<input type="radio" name="busInfo.isOnlyDriver" value="1" ${fn:trim(busInfo.isOnlyDriver)=='1'?'checked' : '' }/>是 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="busInfo.isOnlyDriver" value="0"  ${fn:trim(busInfo.isOnlyDriver)=='0'?'checked' : '' }/>否&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
				<tr id="usrTr">
					<td width="15%" class="lbg">员工名称：</td>
					<td width="35%">
						<input type="text" class="easyui-validatebox" id="userId" name="busInfo.driverId" value="${busInfo.driverId}">
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">年检到期时间：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="sendstarttime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
						name="busInfo.yearCheckDate" value="${busInfo.yearCheckDate}"></td>
				</tr>
				<tr>
					<td width="15%" class="lbg">当前里程：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="busInfo.currKm" name="busInfo.currKm"
						value="${busInfo.currKm}"></td>
				</tr>
				<tr>
					<td width="15%" class="lbg">备注：</td>
					<td width="35%">
					<textarea name="busInfo.busMemo" id="busMemo" rows="4" style="width:375px;">${busInfo.busMemo}</textarea>
					</td>
				</tr>
				<tr>
					<td colspan="4" align="center">
					<a href="javascript:saveModel('<%=path %>/busInfo/createOrUpdate')" class="easyui-linkbutton pad" iconCls="icon-ok"/>保存</a>
						<a href="javascript:history.go(-1)" class="easyui-linkbutton pad"
						iconCls="icon-cancel">返回</a></td>
				</tr>
			</table>
			</form>
		</div>
	</div>
</body>
</html>